package me.zhengjie.config;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

/**
 * @Description TODO
 * @Author Long
 * @Date 2021/10/26 15:50
 */
@Component
@ConfigurationProperties(prefix = "spring.redis")
public class RedisConfig {


    /**
     * 数据库索引
     */
    private static String database;

    /**
     * ip
     */
    private static String host;

    /**
     * 端口
     */
    private static String port;

    /**
     * 密码
     */
    private static String password;
    /**
     * 连接超时时间
     */
    private static String timeout;

    public static String getTimeout() {
        return timeout;
    }

    public  void setTimeout(String timeout) {
        RedisConfig.timeout = timeout;
    }

    public static String getDatabase() {
        return database;
    }

    public void setDatabase(String database) {
        RedisConfig.database = database;
    }

    public static String getHost() {
        return host;
    }

    public void setHost(String host) {
        RedisConfig.host = host;
    }

    public static String getPort() {
        return port;
    }

    public void setPort(String port) {
        RedisConfig.port = port;
    }

    public static String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        RedisConfig.password = password;
    }
}
